import request from '@/utils/request'
const version = import.meta.env.VITE_APP_VERSION
// 登录方法
export function login(params) {
  return request({
    url: `/basic/JwtSingleSignOn`,
    headers: {
      repeatSubmit: false,
      isNeedFixParmas: true,
    },
    method: 'post',
    data: params,
  })
}

// 注册方法
export function register(data) {
  return request({
    url: '/register',
    headers: {
      isToken: false,
    },
    method: 'post',
    data: data,
  })
}

// 获取用户详细信息
export function getInfo() {
  return request({
    url: '/getInfo',
    method: 'get',
  })
}

// 退出方法
export function logout() {
  return request({
    url: '/logout',
    method: 'post',
  })
}

//修改用户密码
export const UpdateUserPwd = (parmas) => {
  return request({
    url: '/basic/UpdateUserPwd',
    headers: {
      isNeedFixParmas: true,
    },
    method: 'post',
    data: parmas,
  })
}